home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / wmanager.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  1KB  |  43 lines

  1. #ifndef __WINDOW_MANAGER_H_
  2. #define __WINDOW_MANAGER_H_
  3.  
  4. #include "visible.h"
  5. #include "pcx.h"
  6. #include "output.h"
  7.  
  8. #define DELTA 20
  9.  
  10. class WindowManager
  11.     {
  12.     protected:
  13.         int step;               // 1.pcx, 100.pcx, 200.pcx ...
  14.         Visible** stack;         // Windows that are on screen.
  15.     int s_used;             // 0 - to number of windows - 1.
  16.     int s_size;             // Allocated.
  17.  
  18.     public:
  19.         WindowManager(int stp)
  20.         {
  21.         stack = new Visible*[DELTA];
  22.         s_used = -1;
  23.         s_size = DELTA;
  24.             step = stp;
  25.         }
  26.         virtual ~WindowManager();
  27.  
  28.         void show_window(Visible* object);  // Show stacked or popup window.
  29.         void hide_window();                 // Hide window.
  30.         void redraw_window(rect new_coords);// Resize upper window in stack.
  31.  
  32.         void add(Visible* object);          // Add to the end of stack.
  33.         void moveTo(Visible* object);       // Move object to the stack top.
  34.         void shift();                       // Rotate stack;
  35.         void remove();                      // Remove object from stack top.
  36.  
  37.         char* get_file_name(Visible* object, char* str);  // Unique name.
  38.         int get_number(Visible* object);       // Number of object in stack.
  39.         int* get_cells();                      // Get cells to redraw.
  40.         int overlapped(Visible* object);
  41.     };
  42.  
  43. #endif __WINDOW_MANAGER_H_